
export const uselevel = () => {
      const data = [
            { type: "事故等级1", value: 8 },
          { type: "事故等级2", value: 34 },
          { type: "事故等级3", value: 2 },
          { type: "事故等级4", value: 1 },
      ];
      const config = {
            appendPadding: 10,
            angleField: "value",
            colorField: "type",
            radius: 0.9,
            label: {
                  type: 'spider',
                  labelHeight: 28,
                  content: '{name}\n{percentage}',
                  style: {
                        /* 设置标注的颜色 */
                        fill: '#fff',
                        stroke: 'black',
                        shadowColor: '#652e80',
                        shadowBlur: 20,
                        cursor: 'pointer'
                  }
            },
            interactions: [{ type: "element-active" }],
            data,
            height: 270,
            legend: {
                  position: 'top',
                  itemName:{
                        style:{
                              fill:"#fff"
                        }
                  }
            },
      }
      return {
            config,
  		data	
      }
}